package com.plian.system.entity.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @description:
 * @author: gangan
 * @create: 2021-03-09 16:06
 */
@Data
@TableName("sys_user")
@ApiModel(value = "用户账号")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.UUID)
    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "账号")
    @TableField(value = "USERNAME")
    private String username;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "用户名")
    private String name;

    @ApiModelProperty(value = "联系电话")
    private String phone;

    @ApiModelProperty(value = "管理员:0;国资:1；领导2；企业3；默认3")
    private String type;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "CREATDATE")
    private Date createDate;

    @ApiModelProperty(value = "创建人")
    @TableField(value = "creat_user")
    private String createUser;

    @ApiModelProperty(value = "是否集团管理员")
    private String isGroupAdmin;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "初始密码是否修改")
    private String isInitialPassword;

    @ApiModelProperty(value = "密码更新时间")
    private Date passwordUpdateTime;

    @ApiModelProperty(value = "所属处室")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long officeId;

    @ApiModelProperty(value = "数据来源 0监管平台 3一体化平台")
    private String dataSource;

    @ApiModelProperty(value = "数据来源id")
    private String dataSourceId;

    @ApiModelProperty(value = "状态 1-启用 0-停用")
    private Integer status;
}
